Skip to content

[release-4.21] CNTRLPLANE-3873: Backport controlPlaneVersion status to release-4.21#9054

Open
devguyio wants to merge 4 commits into
openshift:release-4.21from
devguyio:backport-controlplaneversion-release-4.21
Open

[release-4.21] CNTRLPLANE-3873: Backport controlPlaneVersion status to release-4.21#9054
devguyio wants to merge 4 commits into
openshift:release-4.21from
devguyio:backport-controlplaneversion-release-4.21

Conversation

@devguyio

@devguyio devguyio commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Cherry-pick of #7887 (CNTRLPLANE-2914: Add controlPlaneVersion status to HostedCluster and HostedControlPlane) to release-4.21.

This backport adds the controlPlaneVersion status field to HostedCluster and HostedControlPlane, providing a management-side view of control plane component rollout status independent of the CVO.

Changes

  • Add ControlPlaneVersionStatus and ControlPlaneUpdateHistory API types
  • Implement reconcileControlPlaneVersion aggregation logic in CPO
  • Implement pruneHistory with CVO weighted ranking algorithm
  • Propagate controlPlaneVersion from HCP to HC status
  • Add WaitForControlPlaneRollout e2e helper (gated to 4.21+)
  • Add WaitForImageRollout deprecated alias for WaitForDataPlaneRollout
  • Comprehensive unit test coverage for API types, reconciliation, pruning, and propagation

Conflict Resolution

  • CRD manifest files deleted in release-4.21 (GCPPlatform, HCPEtcdBackup, ClusterUpdateAcceptRisks, ExternalOIDCWithUpstreamParity) were excluded
  • Configuration field in applyconfiguration types preserved (exists in 4.21, not in original feature branch base)
  • WaitForControlPlaneComponentRollout (existing 4.21 function) preserved alongside new WaitForControlPlaneRollout
  • Version gate adjusted from Version422 to Version421 for backport context

Ref: #7887

…nent versions

Add ControlPlaneVersionStatus and ControlPlaneUpdateHistory types to
HostedClusterStatus and HostedControlPlaneStatus. These track
management-side control plane component versions independently from CVO,
enabling service providers to detect completed control plane upgrades
and compute NodePool version skew without waiting for data-plane rollout.

Ref: CNTRLPLANE-2914

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot

openshift-ci-robot commented Jul 22, 2026

Copy link
Copy Markdown

@devguyio: This pull request references CNTRLPLANE-2914 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target either version "4.21." or "openshift-4.21.", but it targets "openshift-4.22" instead.

Details

In response to this:

Summary

Cherry-pick of #7887 (CNTRLPLANE-2914: Add controlPlaneVersion status to HostedCluster and HostedControlPlane) to release-4.21.

This backport adds the controlPlaneVersion status field to HostedCluster and HostedControlPlane, providing a management-side view of control plane component rollout status independent of the CVO.

Changes

  • Add ControlPlaneVersionStatus and ControlPlaneUpdateHistory API types
  • Implement reconcileControlPlaneVersion aggregation logic in CPO
  • Implement pruneHistory with CVO weighted ranking algorithm
  • Propagate controlPlaneVersion from HCP to HC status
  • Add WaitForControlPlaneRollout e2e helper (gated to 4.21+)
  • Add WaitForImageRollout deprecated alias for WaitForDataPlaneRollout
  • Comprehensive unit test coverage for API types, reconciliation, pruning, and propagation

Conflict Resolution

  • CRD manifest files deleted in release-4.21 (GCPPlatform, HCPEtcdBackup, ClusterUpdateAcceptRisks, ExternalOIDCWithUpstreamParity) were excluded
  • Configuration field in applyconfiguration types preserved (exists in 4.21, not in original feature branch base)
  • WaitForControlPlaneComponentRollout (existing 4.21 function) preserved alongside new WaitForControlPlaneRollout
  • Version gate adjusted from Version422 to Version421 for backport context

Ref: #7887

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: c2266c26-5344-464e-81ec-8b2d658a739f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@openshift-ci
openshift-ci Bot requested review from csrwng and jparrill July 22, 2026 12:14
@openshift-ci openshift-ci Bot added the area/api Indicates the PR includes changes for the API label Jul 22, 2026
@openshift-ci

openshift-ci Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: devguyio

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added area/cli Indicates the PR includes changes for CLI approved Indicates a PR has been approved by an approver from all required OWNERS files. area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/documentation Indicates the PR includes changes for documentation area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release and removed do-not-merge/needs-area labels Jul 22, 2026
@devguyio devguyio changed the title CNTRLPLANE-2914: Backport controlPlaneVersion status to release-4.21 CNTRLPLANE-3873: Backport controlPlaneVersion status to release-4.21 Jul 22, 2026
@openshift-ci-robot

openshift-ci-robot commented Jul 22, 2026

Copy link
Copy Markdown

@devguyio: This pull request references CNTRLPLANE-3873 which is a valid jira issue.

Details

In response to this:

Summary

Cherry-pick of #7887 (CNTRLPLANE-2914: Add controlPlaneVersion status to HostedCluster and HostedControlPlane) to release-4.21.

This backport adds the controlPlaneVersion status field to HostedCluster and HostedControlPlane, providing a management-side view of control plane component rollout status independent of the CVO.

Changes

  • Add ControlPlaneVersionStatus and ControlPlaneUpdateHistory API types
  • Implement reconcileControlPlaneVersion aggregation logic in CPO
  • Implement pruneHistory with CVO weighted ranking algorithm
  • Propagate controlPlaneVersion from HCP to HC status
  • Add WaitForControlPlaneRollout e2e helper (gated to 4.21+)
  • Add WaitForImageRollout deprecated alias for WaitForDataPlaneRollout
  • Comprehensive unit test coverage for API types, reconciliation, pruning, and propagation

Conflict Resolution

  • CRD manifest files deleted in release-4.21 (GCPPlatform, HCPEtcdBackup, ClusterUpdateAcceptRisks, ExternalOIDCWithUpstreamParity) were excluded
  • Configuration field in applyconfiguration types preserved (exists in 4.21, not in original feature branch base)
  • WaitForControlPlaneComponentRollout (existing 4.21 function) preserved alongside new WaitForControlPlaneRollout
  • Version gate adjusted from Version422 to Version421 for backport context

Ref: #7887

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@devguyio devguyio changed the title CNTRLPLANE-3873: Backport controlPlaneVersion status to release-4.21 [release-4.21] CNTRLPLANE-3873: Backport controlPlaneVersion status to release-4.21 Jul 22, 2026

@jparrill jparrill left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Ahmed, the core cherry-pick looks clean — the source code is identical to #7887. A couple of things I noticed:

The PR description says "Add WaitForControlPlaneRollout e2e helper (gated to 4.21+)" and "Add WaitForImageRollout deprecated alias for WaitForDataPlaneRollout", but I don't see those changes in the diff. The original PR (#7887) had 7 e2e files that aren't here:

  • test/e2e/util/controlplaneversion.go (isControlPlaneVersionCompleted, controlPlaneVersionSteadyState)
  • test/e2e/util/upgrade_safe_check.go (113 lines)
  • test/e2e/util/util.go (WaitForImageRolloutWaitForDataPlaneRollout + WaitForControlPlaneRollout)
  • test/e2e/util/hypershift_framework.go (UpgradeContext)
  • test/e2e/control_plane_upgrade_test.go, upgrade_hypershift_operator_test.go, karpenter_test.go

The parent epic CNTRLPLANE-3872 lists "E2E test coverage validates the backported functionality" in its acceptance criteria. Are the e2e changes coming in a follow-up PR, or were they lost during the cherry-pick? If the release-4.21 e2e framework is structured differently and the cherry-pick doesn't apply cleanly, that's fine — just want to make sure there's a plan.

Also,

  • The description should be updated to match what's actually in the diff.
  • Right now it claims e2e helpers that aren't here.
  • And last but not least verify test is failing due to lint issues

Comment thread Makefile Outdated
# When not otherwise set, diff/lint against the local main branch.
# This is always set in OpenShift CI.
PULL_BASE_SHA ?= main

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI — on main, PULL_BASE_SHA now has auto-detection of the upstream remote (git remote -v | grep openshift/hypershift). The simpler ?= main here is fine for the backport since that infra wasn't on release-4.21.

devguyio and others added 3 commits July 23, 2026 20:08
… and docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tatus

Implement reconcileControlPlaneVersion() that aggregates
ControlPlaneComponent status into hcp.Status.ControlPlaneVersion with
version transition logic, image-only change detection, and
observedGeneration tracking.

Include pruneHistory() ported from CVO's weighted ranking algorithm
with exact constants to cap history at 100 entries.

Ref: CNTRLPLANE-2914

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
Deep-copy controlPlaneVersion from HostedControlPlane status to
HostedCluster status, following the existing Platform field propagation
pattern. Handles nil gracefully for version skew safety during rolling
upgrades.

Ref: CNTRLPLANE-2914

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
@devguyio
devguyio force-pushed the backport-controlplaneversion-release-4.21 branch from 74d1d3a to 7f0eb92 Compare July 23, 2026 22:02
@devguyio

Copy link
Copy Markdown
Contributor Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling required tests:
/test verify-deps

@openshift-ci

openshift-ci Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@devguyio: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/api Indicates the PR includes changes for the API area/cli Indicates the PR includes changes for CLI area/control-plane-operator Indicates the PR includes changes for the control plane operator - in an OCP release area/documentation Indicates the PR includes changes for documentation area/hypershift-operator Indicates the PR includes changes for the hypershift operator and API - outside an OCP release jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants